<?php

namespace app\admin\validate;

use think\Validate;

class SalaryBenchmarkData extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'name' => 'require|max:255',
        'num' => 'float|gt:0',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'name.require' => '姓名不能为空',
        'name.max' => '姓名填入过长',
        'num.float' => '次数需要是数字',
        'num.gt' => '次数需要大于0',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['name','num'],
        'edit' => ['name','num'],
    ];
    
}
